package com.norma.macaron.common.model.response;

import com.norma.macaron.common.model.enums.ResultCode;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;

/**
 * @author zhangchaofeng
 * @date 2020/6/4 0004
 * @description
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
public class BaseResponse implements Serializable {

    private static final long serialVersionUID = -8024993635155297435L;

    public Integer code;
    public String message;

    public BaseResponse(ResultCode resultCode){
        this.code = resultCode.code();
        this.message = resultCode.message();
    }

}
